<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It is a breeze. Simply tell Lumen the URIs it should respond to
| and give it the Closure to call when that URI is requested.
|
*/

$app->get('/', function () use ($app) {
    return $app->version();
});
$app->group(['prefix' => 'v1', 'namespace' => 'v1'], function($app)
{

//用户
$app->post('/member/add',"MemberController@add");               //添加用户
$app->get('/member/{member_id}',"MemberController@get_data"); //获取用户


//美发师
$app->post('/hairdresser/add',"HairdresserController@add"); //添加美发师
$app->get('/hairdresser/{hairdresser_id}',"HairdresserController@get_data"); //获取单个美发师
$app->get('/hairdresser/all',"HairdresserController@get_all"); //获取所有美发师
$app->post('/hairdresser/service',"HairdresserController@get_item_all"); //获取所有美发师

//美发师
$app->post('/level/add',"LevelsController@add"); //添加美发师等级
$app->get('/level/{level_id}',"LevelsController@get_data"); //获取单个美发师等级
$app->get('/level/all',"LevelsController@get_all"); //获取所有美发师等级

//配置
//$app->post('/setting/add','SettingController@add');     //添加配置信息
$app->post('/setting/update','SettingController@update');//修改配置信息
$app->post('/setting/{column_name}','SettingController@update');//修改配置信息
$app->post('/setting/all','ServiceController@get_conf');//修改配置信息

//订单
$app->post('order/add','OrdersController@add');//添加订单
$app->get('order/{order_id}','OrdersController@get_data');//获取单个订单信息
$app->get('/order/all',"OrdersController@get_all"); //获取所有订单信息
$app->get('/order/hairdresser',"OrdersController@get_hairdresser_order"); //获取设计师所有订单
$app->get('/order/test',"OrdersController@test"); //获取设计师所有订单
$app->post('/order/orderlist',"OrdersController@orderList"); //获取设计师所有订单
//服务项目
$app->post('service/add','ServiceController@add');
$app->post('service/one','ServiceController@get_data');
$app->get('service/all','ServiceController@get_all');
});